package practica5;

import java.io.*;
import org.antlr.*;
import org.antlr.runtime.ANTLRFileStream;
import org.antlr.runtime.CharStream;
import org.antlr.runtime.CommonTokenStream;
import org.antlr.runtime.RecognitionException;


public class Procesador {
	public static void main(String args[]) throws IOException, RecognitionException {
		try {
			CharStream cs = new ANTLRFileStream("EjemploFlex");
			CommonTokenStream tokens = new CommonTokenStream();
	        
			Lexico analex = new Lexico(cs);
	        tokens.setTokenSource(analex);
//	        System.out.println(tokens);
	        Sintactico anasint = new Sintactico(tokens);
	        anasint.entrada();
		}
		catch(IOException ioe) {
			System.err.println(ioe.getMessage());
		}
	}

}
